package exception

import (
	"gitee.com/xxhsjp/x-core/app"
	"gitee.com/xxhsjp/x-core/enums"
)

var NotNullException = NewTraceError(&NotNull{
	code: enums.NotNull.Code,
	msg:  enums.NotNull.Text,
})

type NotNull struct {
	code string
	msg  string
}

func (e *NotNull) Code() string {
	return app.App.Code + e.code
}

func (e *NotNull) Error() string {
	return e.msg
}
